Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

Q is empty.

The TRS is overlay and locally confluent. By [15] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The set Q consists of the following terms:

ap(ap(map, x0), x1)
ap(ap(ap(if, true), x0), x1)
ap(ap(ap(if, null), x0), x1)
ap(ap(if2, x0), x1)
ap(isEmpty, null)
ap(isEmpty, ap(ap(cons, x0), x1))
ap(last, ap(ap(cons, x0), null))
ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2)))
ap(dropLast, ap(ap(cons, x0), null))
ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2)))


Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

AP(ap(map, f), xs) → AP(ap(if, ap(isEmpty, xs)), f)
AP(ap(ap(if, null), f), xs) → AP(f, ap(last, xs))
AP(ap(ap(if, null), f), xs) → AP(ap(if2, f), xs)
AP(ap(map, f), xs) → AP(if, ap(isEmpty, xs))
AP(ap(ap(if, null), f), xs) → AP(cons, ap(f, ap(last, xs)))
AP(ap(ap(if, null), f), xs) → AP(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
AP(ap(map, f), xs) → AP(isEmpty, xs)
AP(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(last, ap(ap(cons, y), ys))
AP(ap(ap(if, null), f), xs) → AP(last, xs)
AP(ap(if2, f), xs) → AP(dropLast, xs)
AP(ap(ap(if, null), f), xs) → AP(if2, f)
AP(ap(map, f), xs) → AP(ap(ap(if, ap(isEmpty, xs)), f), xs)
AP(ap(if2, f), xs) → AP(ap(map, f), ap(dropLast, xs))
AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(dropLast, ap(ap(cons, y), ys))
AP(ap(if2, f), xs) → AP(map, f)
AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The set Q consists of the following terms:

ap(ap(map, x0), x1)
ap(ap(ap(if, true), x0), x1)
ap(ap(ap(if, null), x0), x1)
ap(ap(if2, x0), x1)
ap(isEmpty, null)
ap(isEmpty, ap(ap(cons, x0), x1))
ap(last, ap(ap(cons, x0), null))
ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2)))
ap(dropLast, ap(ap(cons, x0), null))
ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2)))

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

AP(ap(map, f), xs) → AP(ap(if, ap(isEmpty, xs)), f)
AP(ap(ap(if, null), f), xs) → AP(f, ap(last, xs))
AP(ap(ap(if, null), f), xs) → AP(ap(if2, f), xs)
AP(ap(map, f), xs) → AP(if, ap(isEmpty, xs))
AP(ap(ap(if, null), f), xs) → AP(cons, ap(f, ap(last, xs)))
AP(ap(ap(if, null), f), xs) → AP(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
AP(ap(map, f), xs) → AP(isEmpty, xs)
AP(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(last, ap(ap(cons, y), ys))
AP(ap(ap(if, null), f), xs) → AP(last, xs)
AP(ap(if2, f), xs) → AP(dropLast, xs)
AP(ap(ap(if, null), f), xs) → AP(if2, f)
AP(ap(map, f), xs) → AP(ap(ap(if, ap(isEmpty, xs)), f), xs)
AP(ap(if2, f), xs) → AP(ap(map, f), ap(dropLast, xs))
AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(dropLast, ap(ap(cons, y), ys))
AP(ap(if2, f), xs) → AP(map, f)
AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The set Q consists of the following terms:

ap(ap(map, x0), x1)
ap(ap(ap(if, true), x0), x1)
ap(ap(ap(if, null), x0), x1)
ap(ap(if2, x0), x1)
ap(isEmpty, null)
ap(isEmpty, ap(ap(cons, x0), x1))
ap(last, ap(ap(cons, x0), null))
ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2)))
ap(dropLast, ap(ap(cons, x0), null))
ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2)))

We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

AP(ap(map, f), xs) → AP(ap(if, ap(isEmpty, xs)), f)
AP(ap(ap(if, null), f), xs) → AP(f, ap(last, xs))
AP(ap(ap(if, null), f), xs) → AP(ap(if2, f), xs)
AP(ap(ap(if, null), f), xs) → AP(cons, ap(f, ap(last, xs)))
AP(ap(map, f), xs) → AP(if, ap(isEmpty, xs))
AP(ap(ap(if, null), f), xs) → AP(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
AP(ap(map, f), xs) → AP(isEmpty, xs)
AP(ap(ap(if, null), f), xs) → AP(last, xs)
AP(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(last, ap(ap(cons, y), ys))
AP(ap(if2, f), xs) → AP(dropLast, xs)
AP(ap(ap(if, null), f), xs) → AP(if2, f)
AP(ap(map, f), xs) → AP(ap(ap(if, ap(isEmpty, xs)), f), xs)
AP(ap(if2, f), xs) → AP(ap(map, f), ap(dropLast, xs))
AP(ap(if2, f), xs) → AP(map, f)
AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(dropLast, ap(ap(cons, y), ys))
AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The set Q consists of the following terms:

ap(ap(map, x0), x1)
ap(ap(ap(if, true), x0), x1)
ap(ap(ap(if, null), x0), x1)
ap(ap(if2, x0), x1)
ap(isEmpty, null)
ap(isEmpty, ap(ap(cons, x0), x1))
ap(last, ap(ap(cons, x0), null))
ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2)))
ap(dropLast, ap(ap(cons, x0), null))
ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2)))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 3 SCCs with 10 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ QDPOrderProof
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(dropLast, ap(ap(cons, y), ys))

The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The set Q consists of the following terms:

ap(ap(map, x0), x1)
ap(ap(ap(if, true), x0), x1)
ap(ap(ap(if, null), x0), x1)
ap(ap(if2, x0), x1)
ap(isEmpty, null)
ap(isEmpty, ap(ap(cons, x0), x1))
ap(last, ap(ap(cons, x0), null))
ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2)))
ap(dropLast, ap(ap(cons, x0), null))
ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2)))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

DROPLAST(cons(x, cons(y, ys))) → DROPLAST(cons(y, ys))

R is empty.
The set Q consists of the following terms:

map(x0, x1)
if(true, x0, x1)
if(null, x0, x1)
if2(x0, x1)
isEmpty(null)
isEmpty(cons(x0, x1))
last(cons(x0, null))
last(cons(x0, cons(x1, x2)))
dropLast(cons(x0, null))
dropLast(cons(x0, cons(x1, x2)))

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(dropLast, ap(ap(cons, y), ys))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
DROPLAST(x1)  =  x1
cons(x1, x2)  =  cons(x2)

Lexicographic Path Order [19].
Precedence:
trivial

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The set Q consists of the following terms:

ap(ap(map, x0), x1)
ap(ap(ap(if, true), x0), x1)
ap(ap(ap(if, null), x0), x1)
ap(ap(if2, x0), x1)
ap(isEmpty, null)
ap(isEmpty, ap(ap(cons, x0), x1))
ap(last, ap(ap(cons, x0), null))
ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2)))
ap(dropLast, ap(ap(cons, x0), null))
ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2)))

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AP(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(last, ap(ap(cons, y), ys))

The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The set Q consists of the following terms:

ap(ap(map, x0), x1)
ap(ap(ap(if, true), x0), x1)
ap(ap(ap(if, null), x0), x1)
ap(ap(if2, x0), x1)
ap(isEmpty, null)
ap(isEmpty, ap(ap(cons, x0), x1))
ap(last, ap(ap(cons, x0), null))
ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2)))
ap(dropLast, ap(ap(cons, x0), null))
ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2)))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13]. Here, we combined the reduction pair processor with the A-transformation [14] which results in the following intermediate Q-DP Problem.
Q DP problem:
The TRS P consists of the following rules:

LAST(cons(x, cons(y, ys))) → LAST(cons(y, ys))

R is empty.
The set Q consists of the following terms:

map(x0, x1)
if(true, x0, x1)
if(null, x0, x1)
if2(x0, x1)
isEmpty(null)
isEmpty(cons(x0, x1))
last(cons(x0, null))
last(cons(x0, cons(x1, x2)))
dropLast(cons(x0, null))
dropLast(cons(x0, cons(x1, x2)))

We have to consider all minimal (P,Q,R)-chains.


The following pairs can be oriented strictly and are deleted.


AP(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → AP(last, ap(ap(cons, y), ys))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
LAST(x1)  =  x1
cons(x1, x2)  =  cons(x2)

Lexicographic Path Order [19].
Precedence:
trivial

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The set Q consists of the following terms:

ap(ap(map, x0), x1)
ap(ap(ap(if, true), x0), x1)
ap(ap(ap(if, null), x0), x1)
ap(ap(if2, x0), x1)
ap(isEmpty, null)
ap(isEmpty, ap(ap(cons, x0), x1))
ap(last, ap(ap(cons, x0), null))
ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2)))
ap(dropLast, ap(ap(cons, x0), null))
ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2)))

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

AP(ap(ap(if, null), f), xs) → AP(f, ap(last, xs))
AP(ap(map, f), xs) → AP(ap(ap(if, ap(isEmpty, xs)), f), xs)
AP(ap(ap(if, null), f), xs) → AP(ap(if2, f), xs)
AP(ap(if2, f), xs) → AP(ap(map, f), ap(dropLast, xs))

The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The set Q consists of the following terms:

ap(ap(map, x0), x1)
ap(ap(ap(if, true), x0), x1)
ap(ap(ap(if, null), x0), x1)
ap(ap(if2, x0), x1)
ap(isEmpty, null)
ap(isEmpty, ap(ap(cons, x0), x1))
ap(last, ap(ap(cons, x0), null))
ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2)))
ap(dropLast, ap(ap(cons, x0), null))
ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2)))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


AP(ap(ap(if, null), f), xs) → AP(f, ap(last, xs))
The remaining pairs can at least be oriented weakly.

AP(ap(map, f), xs) → AP(ap(ap(if, ap(isEmpty, xs)), f), xs)
AP(ap(ap(if, null), f), xs) → AP(ap(if2, f), xs)
AP(ap(if2, f), xs) → AP(ap(map, f), ap(dropLast, xs))
Used ordering: Combined order from the following AFS and order.
AP(x1, x2)  =  x1
ap(x1, x2)  =  ap(x2)

Lexicographic Path Order [19].
Precedence:
trivial

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP

Q DP problem:
The TRS P consists of the following rules:

AP(ap(map, f), xs) → AP(ap(ap(if, ap(isEmpty, xs)), f), xs)
AP(ap(ap(if, null), f), xs) → AP(ap(if2, f), xs)
AP(ap(if2, f), xs) → AP(ap(map, f), ap(dropLast, xs))

The TRS R consists of the following rules:

ap(ap(map, f), xs) → ap(ap(ap(if, ap(isEmpty, xs)), f), xs)
ap(ap(ap(if, true), f), xs) → null
ap(ap(ap(if, null), f), xs) → ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs))
ap(ap(if2, f), xs) → ap(ap(map, f), ap(dropLast, xs))
ap(isEmpty, null) → true
ap(isEmpty, ap(ap(cons, x), xs)) → null
ap(last, ap(ap(cons, x), null)) → x
ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(last, ap(ap(cons, y), ys))
ap(dropLast, ap(ap(cons, x), null)) → null
ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) → ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys)))

The set Q consists of the following terms:

ap(ap(map, x0), x1)
ap(ap(ap(if, true), x0), x1)
ap(ap(ap(if, null), x0), x1)
ap(ap(if2, x0), x1)
ap(isEmpty, null)
ap(isEmpty, ap(ap(cons, x0), x1))
ap(last, ap(ap(cons, x0), null))
ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2)))
ap(dropLast, ap(ap(cons, x0), null))
ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2)))

We have to consider all minimal (P,Q,R)-chains.